<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>DEMO表单弹窗</title>
<meta name="Description" content="DEMO弹窗操作" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../../res/weadmin_2.26/static/css/font.css">
<link rel="stylesheet" href="../../../res/weadmin_2.26/static/css/weadmin.css">

</head>

<body>

	<div class="weadmin-body">
		添加窗口内容.
		
		<form id="addform" class="layui-form layui-col-md12 " lay-filter="addformFilter"  >
			
		<div class="layui-col-lg7 layui-form-item ">
          <label class="layui-form-label">属性1:</label>
          <div class="layui-input-block">
          	<input type="text" name="prop1" value=""  placeholder="属性1" lay-verify="required|nikename" class="layui-input">
          </div>
        </div>

        <div class="layui-col-lg7 layui-form-item ">
          <label class="layui-form-label">属性2:</label>
          <div class="layui-input-block">
          	<input type="text" name="prop2" value=""  placeholder="属性2" lay-verify="required" class="layui-input">
          </div>
        </div>

			<button class="layui-btn" type="button"  lay-submit=""  lay-filter="addformFilter"   > 提交表单 </button>
		</form>

		<button onclick="getValueAndClose()" class="layui-btn" > 获取值并关闭窗口 </button>
	</div>
</body>

<script type="text/javascript" src="//cdn.staticfile.org/js-cookie/2.2.0/js.cookie.js" charset="utf-8"></script>
<script type="text/javascript" src="//cdn.staticfile.org/jquery/1.12.4/jquery.js" charset="utf-8"></script>
<!-- 
	<script type="text/javascript" src="//cdn.staticfile.org/layer/2.3/layer.js" charset="utf-8"></script>
-->
<script type="text/javascript" src="../../../res/js/layui_jq_util.js" charset="utf-8"></script>
<script type="text/javascript" src="../../../res/weadmin_2.26/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../../sysmgr/cfg/env_cfg.js" charset="utf-8"></script>
<script type="text/javascript" src="../../../sysmgr/tplt_dft/adm_mgr/js/adm_power_util.js" charset="utf-8"></script>


<script type="text/javascript" charset="utf-8">
	
	// layui工具类
	var layuiJqUtil = new LayuiJqUtil();
	// 页面请求参数
  var paramObj = layuiJqUtil.getUrlParamObj();
  // 窗口初始化对象
	var chooseWinInit = layuiJqUtil.layerChooseWinInit();
	
	chooseWinInit.parentLayer.msg("收到页面请求参数:" + JSON.stringify(paramObj));

// ///////////////////////////////////////////////////// 
	// 获取窗口值并关闭弹窗口
	function getValueAndClose(){
		var dataVal = {
			paramA:"valueA",
			paramB:123,
			paramC:"valueC"
		};
		layuiJqUtil.layerChooseWinRtdataAndClose(dataVal,chooseWinInit);
	}

	// layui 初始化 
	layui.config({
	  base: '../../../res/weadmin_2.26/static/js/'
	  ,version: '101100'
	});
	
	layui.use(['jquery','form','laydate','table'], function() {
		var $ = layui.jquery ; 
		var form = layui.form ; 
		var laydate = layui.laydate ;
		var table = layui.table ; 
		
		form.on("submit(addformFilter)",function(filterData){
			console.info(filterData);
			chooseWinInit.parentLayer.alert("表单提交了.")
		});
		
	});


</script>

</html>